<!DOCTYPE html>
<html lang='en'>

<head>
  <meta charset='UTF-8'>
  <meta name='viewport' content='width=device-width, initial-scale=1.0'>
  <title></title>
  <script type='text/javascript' src='js/vue.js'></script>
</head>

<body>
  <div id='app'>
    <div @click.self="fa">
      fa
      <div @click="ch">{{ msg }}</div>
      <a href="http://www.baidu.com" @click.prevent="ch">百度</a>
      <input type="text" @keyup.prevent="keyups">
    </div>
  </div>
  <script type='text/javascript'>
    var vm = new Vue({
      el: '#app',
      data: {
        msg: 'ch'
      },
      methods: {
        fa() {
          console.log('这是父元素');
        },
        ch() {
          console.log('这是子元素');
        },
        keyups($event) {
          console.log( $event.key );
        }
      },
    });
  </script>
</body>

</html>